<form [formGroup]="firstGroup">
  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="teacherName">
      教师姓名
    </nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24">
      <input
        nz-input
        formControlName="teacherNameController"
        id="teacherName"
      />
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzSm="6" nzXs="24" nzRequired nzFor="subject"
      >选择科目</nz-form-label
    >
    <nz-form-control [nzSm]="14" [nzXs]="24">
      <nz-select
        id="subject"
        [(ngModel)]="selectedValue"
        (ngModelChange)="onBlur($event)"
        formControlName="subjectController"
        nzPlaceHolder="请选择课程"
      >
        <nz-option
          *ngFor="let item of items"
          nzValue="{{ item.id }}"
          nzLabel="{{ item.name }}"
        ></nz-option>
      </nz-select>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzFor="chapter" nzSm="6" nzXs="24" nzRequired>
      章节
    </nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24">
      <nz-select
        formControlName="chapterController"
        id="chapter"
        [nzMaxTagCount]="3"
        [nzMaxTagPlaceholder]="tagPlaceHolder"
        nzMode="multiple"
        nzPlaceHolder="请选择章节"
        [(ngModel)]="listOfSelectedValue"
        (ngModelChange)="onSelectChapter()"
      >
        <nz-option
          *ngFor="let option of listOfOption"
          [nzLabel]="option.label"
          [nzValue]="option.value"
        ></nz-option>
      </nz-select>
      <ng-template #tagPlaceHolder let-selectedList>
        还有 {{ selectedList.length }} 章已选择
      </ng-template>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzSm="6" nzXs="24" nzRequired nzFor="type"
      >题型</nz-form-label
    >
    <nz-form-control nzSpan="1-24">
      <nz-checkbox-group
        formControlName="typeController"
        (ngModelChange)="log(checkOptionsOne)"
      ></nz-checkbox-group>
    </nz-form-control>
  </nz-form-item>
</form>
